<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>
<chiptrack:checkLogon sourcePage="/salesReport.do?action=shippingreport" />
<%@ page import="com.scalar.chiptrack.utils.ConfigManager,
                 java.util.Calendar"%>
<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>


<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type="text/css" rel=stylesheet>
<SCRIPT language="JavaScript" src="<%=chipTracContext%>/jsp/includes/scripts/functions.js"></SCRIPT>
<SCRIPT language="JavaScript" src="<%=chipTracContext%>/jsp/includes/scripts/validations.js"></SCRIPT>

<script>
    var dateElement = "";
    function openCalendar(dateValue)
    {
        dateElement = dateValue;
        newWindow = window.open('<%=chipTracContext%>/jsp/includes/calendar.html','optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=no,width=180,height=440,resizable=no');
        newWindow.moveTo(550,180);
        newWindow.focus();
    }
	function assignDate(passedValue)
    {
        dateElement.value=passedValue;
        window.focus();
    }

function validateFromAndToDates()
{
    formdoc = document.shipReport;
    errMsg = '';

    var pa	= document.getElementById("errors")

    if(chkDate(formdoc.datefrom.value,'From-Date','N') == false)
    {
        pa.innerHTML = errMsg;
        formdoc.datefrom.focus();
        return false;
    }

    if(chkDate(formdoc.dateto.value,'To-Date','N') == false)
    {
        pa.innerHTML = errMsg;
        formdoc.dateto.focus();
        return false;
    }

    if(formdoc.datefrom.value!='' && formdoc.dateto.value!='')
    {
        if (!validateDateOut(formatDateAsMMDDYYYY(formdoc.datefrom.value),formatDateAsMMDDYYYY(formdoc.dateto.value)))
        {
            pa.innerHTML = "To Date cannot be less than From Date";
            formdoc.dateto.focus();
            return false;
        }
    }
    return true;
}

function dateRange()
{
    var d = new Date();
    var day = d.getDate();
    var month = d.getMonth()+1;
    var year = d.getFullYear();
    var hour = d.getHours();
    var min = d.getMinutes();
    var sec = d.getSeconds();

    var reportName = document.shipReport.reportname.value;

    var defaultPrompt = day+"/"+month+"/"+year+":"+hour+":"+min+":"+sec;

    var success;
    success = true;
    success = validateFromAndToDates();
    if(success == false)
    {
       return false;
    }

    if (document.shipReport.product.value=='')
        document.shipReport.prompt0.value='0';
    else
        document.shipReport.prompt0.value = document.shipReport.product.value;

    document.shipReport.prompt1.value ='0';
    document.shipReport.prompt4.value ='0';
    document.shipReport.prompt5.value ='0';
    document.shipReport.prompt6.value ='0';
    document.shipReport.prompt7.value ='0';
    document.shipReport.prompt8.value = defaultPrompt;
    document.shipReport.prompt9.value = '';
    document.shipReport.prompt10.value ='';

    if (document.shipReport.datefrom.value=='')
        document.shipReport.prompt4.value='0';
    else
        document.shipReport.prompt4.value = document.shipReport.datefrom.value;

    if (document.shipReport.dateto.value=='')
        document.shipReport.prompt5.value='0';
    else
        document.shipReport.prompt5.value = document.shipReport.dateto.value;

    <%--if (document.shipReport.salesorderno.value=='')
        document.shipReport.prompt1.value='0';
    else
        document.shipReport.prompt1.value = document.shipReport.salesorderno.value;

    if (document.shipReport.customer.value=='')
        document.shipReport.prompt2.value='0';
    else
        document.shipReport.prompt2.value = document.shipReport.customer.value;

    if (document.shipReport.datefrom.value=='')
        document.shipReport.prompt3.value='0';
    else
        document.shipReport.prompt3.value = document.shipReport.datefrom.value;

    if (document.shipReport.dateto.value=='')
        document.shipReport.prompt4.value='0';
    else
        document.shipReport.prompt4.value = document.shipReport.dateto.value;

    document.shipReport.prompt5.value = document.shipReport.orderType.value;--%>


    var period="";
    var cat="";
    var tp= "";

    for( counter = 0; counter < shipReport.category.length; counter++ )
    {
        if( shipReport.category[ counter ].checked )
        {
            cat = shipReport.category[ counter ].value;
        }
    }
    document.shipReport.prompt2.value = cat;

    for( counter = 0; counter < shipReport.periodically.length; counter++ )
    {
        if( shipReport.periodically[ counter ].checked )
        {
            period = shipReport.periodically[ counter ].value;
        }
    }

    if( reportName == "inventoryreport" )
    {
        document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/Inventory_Report_by_Product_Family_by_Stage.rpt";
        document.shipReport.submit();
        return true;
    }

    if (period == "byWeek")
    {
        document.shipReport.prompt3.value='WEEK';
        if( reportName == "shipmentsummaryreport" )
        {
            document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/SHIPMENT_SUMMARY_BY_PRODUCT_FAMILY_BY_Week.rpt";
        }
        if( reportName == "bookingsummaryreport" )
        {
            document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/BOOKING_REPORT_BY_PRODUCT_FAMILY_BY_Week.rpt";
        }
        document.shipReport.submit();
    }
    else if (period == "byMonth")
    {
        document.shipReport.prompt3.value='MONTH';
        if( reportName == "shipmentsummaryreport" )
        {
            document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/SHIPMENT_SUMMARY_BY_PRODUCT_FAMILY_BY_Month.rpt";
        }
        if( reportName == "bookingsummaryreport" )
        {
            document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/BOOKING_REPORT_BY_PRODUCT_FAMILY_BY_Month.rpt";
        }
        document.shipReport.submit();
    }
    else if (period == "byQuarter")
    {
        document.shipReport.prompt3.value='QUARTER';
        if( reportName == "shipmentsummaryreport" )
        {
            document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/SHIPMENT_SUMMARY_BY_PRODUCT_FAMILY_BY_Quarter.rpt";
        }
        if( reportName == "bookingsummaryreport" )
        {
            document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/BOOKING_REPORT_BY_PRODUCT_FAMILY_BY_Quarter.rpt";
        }
        document.shipReport.submit();
    }
    else if (period == "byYear")
    {
        document.shipReport.prompt3.value='YEAR';
        if( reportName == "shipmentsummaryreport" )
        {
            document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/SHIPMENT_SUMMARY_BY_PRODUCT_FAMILY_BY_Year.rpt";
        }
        if( reportName == "bookingsummaryreport" )
        {
            document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/BOOKING_REPORT_BY_PRODUCT_FAMILY_BY_Year.rpt";
        }
        document.shipReport.submit();
    }
    return true;
}


function shipmentDateRange()
{

    var pa=document.getElementById("errors");
    pa.innerHTML = "";
    if( document.shipReport.chkbyMonth.checked == true )
    {
        if( document.shipReport.quarter.value == 'All' )
        {
              pa.innerHTML = "<li> Please select Quarter other than All (or) Deselect the By Month Check Box";
              return false
        }
    }

    var d = new Date();
    var day = d.getDate();
    var month = d.getMonth()+1;
    var year = d.getFullYear();
    var hour = d.getHours();
    var min = d.getMinutes();
    var sec = d.getSeconds();

    var reportName = document.shipReport.reportname.value;

    var defaultPrompt = day+"/"+month+"/"+year+":"+hour+":"+min+":"+sec;

    var byQuarter = "";
    for (counter = 0; counter < document.shipReport.quarter.length ; counter++)
	{
		if (document.shipReport.quarter[counter].selected)
        {
            byQuarter = document.shipReport.quarter[counter].value;
		}
	}

    if (document.shipReport.product.value=='')
        document.shipReport.prompt0.value='0';
    else
        document.shipReport.prompt0.value = document.shipReport.product.value;

    document.shipReport.prompt1.value ='0';
    document.shipReport.prompt2.value ='0';
    document.shipReport.prompt3.value='0';
    document.shipReport.prompt4.value ='0';
    document.shipReport.prompt5.value ='0';
    //document.shipReport.prompt6.value ='0';
    //document.shipReport.prompt7.value ='0';
    document.shipReport.prompt8.value = '0';
    document.shipReport.prompt9.value = defaultPrompt;
    document.shipReport.prompt10.value ='';

    if (document.shipReport.quarter.value=='')
        document.shipReport.prompt6.value='0';
    else
        document.shipReport.prompt6.value = document.shipReport.quarter.value;

    if (document.shipReport.year.value=='')
        document.shipReport.prompt7.value='0';
    else
        document.shipReport.prompt7.value = document.shipReport.year.value;


    //alert( " byQuarter " + byQuarter);
    if ( document.shipReport.detailorsummary[0].checked )
    {
        if ( document.shipReport.reportname.value == "shipmentsummaryreport"  )
        {
            if( byQuarter == 'All' && document.shipReport.chkbyMonth.checked == false )
            {
                document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/SHIPMENT_SUMMARY_BY_PRODUCT_BY_DETAIL_BY_ALLQUARTERS.rpt";
            }
            if( byQuarter != 'All' && document.shipReport.chkbyMonth.checked == true )
            {
                document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/SHIPMENT_SUMMARY_BY_PRODUCT_BY_DETAIL_BY_MONTH_BY_QUARTER.rpt";
            }
            if( byQuarter != 'All' && document.shipReport.chkbyMonth.checked == false )
            {
                document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/SHIPMENT_SUMMARY_BY_PRODUCT_BY_DETAIL_BY_QUARTER.rpt";
            }
            //document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/SHIPMENT_SUMMARY_BY_PRODUCT_FAMILY_BY_DETAIL.rpt";
        }
        else
        {
            if( byQuarter == 'All' && document.shipReport.chkbyMonth.checked == false )
            {
                document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/BOOKING_REPORT_BY_PRODUCT_BY_DETAIL_BY_ALLQUARTERS.rpt";
            }
            if( byQuarter != 'All' && document.shipReport.chkbyMonth.checked == true )
            {
                document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/BOOKING_REPORT_BY_PRODUCT_BY_DETAIL_BY_MONTH_BY_QUARTER.rpt";
            }
            if( byQuarter != 'All' && document.shipReport.chkbyMonth.checked == false )
            {
                document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/BOOKING_REPORT_BY_PRODUCT_BY_DETAIL_BY_QUARTER.rpt";
            }
            //document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/BOOKING_REPORT_BY_PRODUCT_FAMILY_BY_DETAIL.rpt";
        }
        document.shipReport.submit();
    }
    else if ( document.shipReport.detailorsummary[1].checked)
    {
        if ( document.shipReport.reportname.value == "shipmentsummaryreport"  )
        {
            if( byQuarter == 'All' && document.shipReport.chkbyMonth.checked == false )
            {
                document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/SHIPMENT_SUMMARY_BY_PRODUCT_FAMILY_BY_DETAIL_BY_ALLQUARTERS.rpt";
            }
            if( byQuarter != 'All' && document.shipReport.chkbyMonth.checked == true )
            {
                document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/SHIPMENT_SUMMARY_BY_PRODUCT_FAMILY_BY_DETAIL_BY_MONTH_BY_QUARTER.rpt";
            }
            if( byQuarter != 'All' && document.shipReport.chkbyMonth.checked == false )
            {
                document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/SHIPMENT_SUMMARY_BY_PRODUCT_FAMILY_BY_DETAIL_BY_QUARTER.rpt";
            }
            //document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/SHIPMENT_SUMMARY_BY_PRODUCT_FAMILY_BY_SUMMARY.rpt";
        }
        else
        {
            if( byQuarter == 'All' && document.shipReport.chkbyMonth.checked == false )
            {
                document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/BOOKING_REPORT_BY_PRODUCT_FAMILY_BY_DETAIL_BY_ALLQUARTERS.rpt";
            }
            if( byQuarter != 'All' && document.shipReport.chkbyMonth.checked == true )
            {
                document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/BOOKING_REPORT_BY_PRODUCT_FAMILY_BY_DETAIL_BY_MONTH_BY_QUARTER.rpt";
            }
            if( byQuarter != 'All' && document.shipReport.chkbyMonth.checked == false )
            {
                document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/BOOKING_REPORT_BY_PRODUCT_FAMILY_BY_DETAIL_BY_QUARTER.rpt";
            }
            //document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/BOOKING_REPORT_BY_PRODUCT_FAMILY_BY_SUMMARY.rpt";
        }
        document.shipReport.submit();
    }
    return true;
}

function inventoryDateRange()
{
    var d = new Date();
    var day = d.getDate();
    var month = d.getMonth()+1;
    var year = d.getFullYear();
    var hour = d.getHours();
    var min = d.getMinutes();
    var sec = d.getSeconds();

    var reportName = document.shipReport.reportname.value;

    var defaultPrompt = day+"/"+month+"/"+year+":"+hour+":"+min+":"+sec;

    /*var success;
    success = true;
    success = validateFromAndToDates();
    if(success == false)
    {
       return false;
    } */

    if (document.shipReport.product.value=='')
        document.shipReport.prompt0.value='0';
    else
        document.shipReport.prompt0.value = document.shipReport.product.value;

    /*if (document.shipReport.datefrom.value=='')
        document.shipReport.prompt3.value='0';
    else
        document.shipReport.prompt3.value = document.shipReport.datefrom.value;

    if (document.shipReport.dateto.value=='')
        document.shipReport.prompt4.value='0';
    else
        document.shipReport.prompt4.value = document.shipReport.dateto.value;
    */
    document.shipReport.prompt1.value ='0';
    document.shipReport.prompt2.value ='0';
    document.shipReport.prompt3.value ='0';
    document.shipReport.prompt4.value ='0';
    document.shipReport.prompt5.value ='0';
    document.shipReport.prompt6.value ='0';
    document.shipReport.prompt7.value ='0';
    document.shipReport.prompt8.value = defaultPrompt;
    document.shipReport.prompt9.value = '';
    document.shipReport.prompt10.value ='';

    if ( document.shipReport.detailorsummary[0].checked )
    {
        document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/Inventory_Report_by_Product_by_Stage.rpt";
    }
    else
    {
        document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/Inventory_Report_by_Product_Family_by_Stage.rpt";
    }

    //document.shipReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Sales/SummaryReports/Inventory_Report_by_Product_Family_by_Stage.rpt";
    document.shipReport.submit();
    return true;

}

function chkQuarter()
{
    var pa=document.getElementById("errors");
    pa.innerHTML = "";
    if( document.shipReport.chkbyMonth.checked == true )
    {
        if( document.shipReport.quarter.value == 'All' )
        {
              pa.innerHTML = "<li> Please select Quarter other than 'All' ";
              return false
        }
    }
    return true
}

function clearErrors()
{
    var pa=document.getElementById("errors");
    pa.innerHTML = "";
}

</script>
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY bgColor="#ffffff" leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<!-- Top Header Start-->
<%@ include file="/jsp/includes/header.jsp" %>
<!-- Top Header End-->

<TABLE cellSpacing=0 cellPadding=0 width="100%" border="0">
    <TR>
        <td width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>
            <!-- Side Navigation start -->

            <% if ( "inventoryreport".equalsIgnoreCase( request.getParameter("reportname") ) ) { %>
                <%@ include file="/jsp/operations/reports_side_menu.jsp" %>
            <% } else { %>
                <%@ include file="/jsp/sales/sales_report_menu.jsp" %>
            <% } %>

            <!-- end of the side navigations -->
        </td>
        <TD bgcolor="#ffffff"><IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
        <TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
        <TD bgcolor="#ffffff">
            <form name="shipReport" method="post">
            <input type="hidden" name="prompt0">
            <input type="hidden" name="prompt1">
            <input type="hidden" name="prompt2">
            <input type="hidden" name="prompt3">
            <input type="hidden" name="prompt4">
            <input type="hidden" name="prompt5">
            <input type="hidden" name="prompt6">
            <input type="hidden" name="prompt7">
            <input type="hidden" name="prompt8">
            <input type="hidden" name="prompt9">
            <input type="hidden" name="prompt10">
            <input type="hidden" name="reportname" value="<%=request.getParameter("reportname")%>">
        </TD>
        <TD valign="top" width="100%">
            <table border="0" width="100%" align="center">
                <tr><td colspan="6" width="100%"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
                <tr><td colspan="6" width="100%"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
                <tr><td colspan="6" width="100%"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
                <tr>
                    <TD width="100%" COLSPAN="6">
                        <TABLE width="100%" align=right border="0">
                            <TR>
                                <TD width="25%">&nbsp;</TD>
                                <TD width="65%"  class="NArialW">
                                <% if ( "shipmentsummaryreport".equalsIgnoreCase( request.getParameter("reportname") )  ) { %>
                                        Shipment Summary Report
                                <% } %>
                                <% if ( "bookingsummaryreport".equalsIgnoreCase( request.getParameter("reportname") ) ) { %>
                                        Booking Summary Report
                                <% } %>
                                <% if ( "inventoryreport".equalsIgnoreCase( request.getParameter("reportname") ) ) { %>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inventory Report
                                <% } %>
                                </TD>
                                <TD width="10%">&nbsp;</TD>
                            </TR>
                        </TABLE>
                    </TD>
                </tr>
                <tr><td colspan="6" width="100%"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
                <tr>
                    <td width="15%">&nbsp;</td>
                    <td width="85%" colspan="5" align="left">
                        <b><font face="Verdana" size="-5" align="center" color="#ff0000" id="errors"></font><b>
                    </td>
                </tr>
                <TR>
                    <TD width="100%" COLSPAN="6">
                        <TABLE width="100%" align=right border="0">
                            <TR>
                                <TD width="20%">&nbsp;</TD>
                                <TD width="15%" class=NArialL>
                                    Base Products
                                </TD>
                                <TD width="55%" class=NArialL>
                                    <select size="1" name="product" class="txfield">
                                        <option value="">All Products</option>
                                        <logic:iterate id="baseProductSelectList" name="baseProductList">
                                            <logic:notEqual name="baseProductSelectList" value="null">
                                                <option value = "<bean:write name="baseProductSelectList" property="value"/>" >
                                                    <bean:write name="baseProductSelectList" property="label"/>
                                                </option>
                                            </logic:notEqual>
                                        </logic:iterate>
                                    </select>
                                </TD>
                                <TD width="10%">&nbsp;</TD>
                            </TR>
                        </TABLE>
                    </TD>
                </TR>
                <TR><TD colSpan="6">&nbsp;</TD></TR>
                <% if ( "inventoryreport".equalsIgnoreCase( request.getParameter("reportname") ) == false ) { %>
                <TR>
                    <TD width="21%">&nbsp;</TD>
                    <TD width="5%" class="NArialL">Year</TD>
                    <TD width="17%" class=NArialL align="left">
                        <html:select name="shipReport" property="year" styleClass="txfield" value='<%=Integer.toString(Calendar.getInstance().get (Calendar.YEAR))%>'>
                            <html:options collection="years" property="value" labelProperty="label" />
                        </html:select>
                    </TD>
                    <TD width="5%" class=NArialL>Quarter&nbsp;</TD>
                    <TD width="32%" class=NArialL>
                       <% String currentQtr = (String) request.getAttribute("currentQtr"); %>
                       <SELECT class=txfield name="quarter" onclick="javascript:clearErrors();">
                       <logic:iterate id="quarterList" name="quarterList">
                            <logic:notEqual name="quarterList" value="null">
                                <logic:equal name="quarterList" property="value" value="<%=currentQtr%>">
                                    <option value = "<bean:write name="quarterList" property="value"/>" SELECTED>
                                        <bean:write name="quarterList" property="label"/>
                                    </option>
                                </logic:equal>
                                <logic:notEqual name="quarterList" property="value" value="<%=currentQtr%>">
                                    <option value = "<bean:write name="quarterList" property="value"/>" >
                                        <bean:write name="quarterList" property="label"/>
                                    </option>
                                </logic:notEqual>
                            </logic:notEqual>
                        </logic:iterate>
                        </SELECT>
                    </TD>
                    <TD width="20%">&nbsp;&nbsp;</TD>
                </TR>
                <TR>
                    <TD width="100%" COLSPAN="6">
                        <TABLE width="100%" align=right border="0">
                            <TR><TD colSpan=4><IMG height=10 src="">&nbsp;</TD></TR>
                            <TR>
                                <TD width="20%">&nbsp;</TD>
                                <TD width="20%" class=NArialL>
                                    <%--<input type="radio" checked name="periodically" value="byMonth" onclick="javascript:disableQuaterDropDownBox()">&nbsp;&nbsp;By Month--%>
                                    <input type="checkbox" name="chkbyMonth" value="byMonth" onClick="javascript:return chkQuarter();">&nbsp;&nbsp;By Month
                                </TD>
                                <TD width="55%" class=NArialL>
                                     <%--<input type="radio" name="periodically" value="byQuarter" onclick="javascript:disableQuaterDropDownBox()">&nbsp;&nbsp;--%>
                                     <%--<input type="checkbox" checked name="chkbyQuarter" value="byQuarter" disabled='true'>&nbsp;&nbsp;
                                     By Quarter--%>&nbsp;
                                </TD>
                                <TD width="5%">&nbsp;</TD>
                            </TR>
                        </TABLE>
                    </TD>
                </TR>
                <% } %>
                <TR>
                    <TD width="100%" COLSPAN="6">
                        <TABLE width="100%" align=right border="0">
                            <TR>
                                <TD width="20%">&nbsp;</TD>
                                <TD width="20%" class=NArialL>
                                    <input type="radio" name="detailorsummary" value="ByDetail">&nbsp;&nbsp;By Detail
                                </TD>
                                <TD width="55%" class=NArialL>
                                     <input type="radio" name="detailorsummary" value="BySummary" checked>&nbsp;&nbsp;By Summary
                                </TD>
                                <TD width="5%">&nbsp;</TD>
                            </TR>
                        </TABLE>
                    </TD>
                </TR>

                <tr><td colspan="6"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20>&nbsp;</td></tr>
                <tr>
                    <td width="30%" colspan="2"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20>&nbsp;</td>
                    <td width="70%"  colspan="4" align="left">
                        <% if ( "inventoryreport".equalsIgnoreCase( request.getParameter("reportname") ) ) { %>
                        <input type="image" onClick="javascript:return inventoryDateRange();"  border="0" src="<%=chipTracContext%>/jsp/includes/images/submit.gif" width="53" height="17" onmouseover="window.status='Click to Generate Report';return true"onmouseout="window.status='';return true"title="Click here to Generate Report">
                        <% } else { %>
                        <%--<input type="image" onClick="javascript:return dateRange();"  border="0" src="<%=chipTracContext%>/jsp/includes/images/submit.gif" width="53" height="17" onmouseover="window.status='Click to Generate Report';return true"onmouseout="window.status='';return true"title="Click here to Generate Report">--%>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="image" onClick="javascript:return shipmentDateRange();"  border="0" src="<%=chipTracContext%>/jsp/includes/images/submit.gif" width="53" height="17" onmouseover="window.status='Click to Generate Report';return true"onmouseout="window.status='';return true"title="Click here to Generate Report">
                        <% } %>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <a href="javascript:document.shipReport.reset();"><img src="<%=chipTracContext%>/jsp/includes/images/reset.gif" border='0' onmouseover="window.status='Click to Reset';return true" onmouseout="window.status='';return true"title="Click here to Reset"></a>
                    </td>
                </tr>
            </table>
            <BR><BR><BR>
            </form>
        </TD>
        <TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
    </TR>
</TABLE>
<!-- Footer starts here -->
<%@ include file="/jsp/includes/footer.jsp" %>
<!-- footer end here -->
</BODY>
</HTML>
